<template>
    <dl class="b-item">
        <dt>
            <img :src="obj.avatar" alt="">
        </dt>
        <dd class="info">
            <h2>{{obj.title}}</h2>
            <p>{{obj.summary}}</p>
        </dd>
        <dd>
            <span>{{obj.tip_welth_sum}}月票</span>
            <div class="btns">
                <router-link tag="button" :to="{name:'detail',params:{id:obj.id}}">查看详情</router-link>
                <shelf-btn :state="obj.state" :id="obj.id"></shelf-btn>
            </div>
        </dd>
    </dl>
</template>
<script>
import shelfBtn from './shelfBtn'
export default {
    components:{
        shelfBtn
    },
    props:{
        obj:{
            type:Object,
            default:() => {
                return {}
            }
        }
    }
}
</script>
<style lang="scss">
    .b-item{
        display: flex;
        margin:15px;
        dt{
            width:90px;
            height: 120px;
            border:1px solid gray;
            overflow: hidden;
            margin-right:15px;
            img{
                width:100%;
                height:100%;
            }
        }
        dd{
            &.info{
                flex:1;
            }
            line-height: 1.5;
            h2{
                font-size:16px;
            }
        }
    }
</style>

